<?php

namespace app\admin\service;



use app\admin\model\Region;

class RegionService extends BaseService
{
    public function __construct()
    {
        $this->model = new Region();
    }

    public function getList()
    {
        $param = request()->param();
        $map = [];

        // 名称
        $name = isset($param['name']) ? trim($param['name']) : '';
        if ($name) {
            $map[] = ['name', 'like', "%{$name}%"];
        }
        $map[] = ['mark', '=', 1];
        $map[] = ['is_long', '=', $param['id']];
        return parent::getList($map); // TODO: Change the autogenerated stub

    }
}